function computedPointSize(data){
    var topModels = [];
    var bottomModels = [];
    let originModels = JSON.parse(JSON.stringify(data));
    originModels.forEach((model,index)=>{
        let topComponents = model.list.filter(com=>com.layer == "top");
        let bottomCompoents = model.list.filter(com=>com.layer == "bottom");
        if(topComponents.length){
            topModels.push({
                model:model.model,
                list:topComponents,
                index
            });
        }
        if(bottomCompoents.length){
            bottomModels.push({
                model:model.model,
                list:bottomCompoents,
                index
            });
        }
    });

    let newModels = originModels.map(model=>{
        model.list = [];
        return model;
    });

    var blob = new Blob(['importScripts("http://192.168.80.22:5501/computedWorker.js")'], {"type": 'application/javascript'});

    var blobUrl = window.URL.createObjectURL(blob);

    var topComputedWorker = new Worker(blobUrl);

    var bottomComputedWorker = new Worker(blobUrl);


    return new Promise((resolve,reject)=>{
        var topFinish = false;
        
        topComputedWorker.onerror = (e)=>{
            console.error("顶层计算失败了",e);
            reject(e);
        }

        bottomComputedWorker.onerror = (e)=>{
            console.error("底层计算失败了",e);
            reject(e);
        }

        topComputedWorker.onmessage = (e)=>{
            topFinish = true;
            e.data.forEach(model=>{
                newModels[model.index].list.push(...model.list);
            });
            if(topFinish && bottomFinish){
                resolve(newModels);
            }
        }

        var bottomFinish = false;
        bottomComputedWorker.onmessage = (e)=>{
            bottomFinish = true;
            e.data.forEach(model=>{
                newModels[model.index].list.push(...model.list);
            });
            if(topFinish && bottomFinish){
                resolve(newModels);
            }
        }

        topComputedWorker.postMessage(topModels);
        // topComputedWorker.postMessage(bottomModels);
        bottomComputedWorker.postMessage(bottomModels);
    });
}